﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AutoGear.BLL;

public partial class controls_wucLoadCMS : System.Web.UI.UserControl
{
    private int cmdId;
    public int CMSID
    {
        get { return cmdId; }
        set { cmdId = value; }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadCMS();
        }
    }

    private void LoadCMS()
    {
        if (CMSID != null)
        {

            CMS cms = CMS.GetCMS(CMSID);
            if (cms != null)
            {
                litCMS.Text = Server.HtmlDecode(cms.CMSContent);
            }
        }
    }
}
